<div class="row">
    <div class="col-md-12 col-sm-12 col-xs-12">
        <div class="x_panel">
            <div class="x_title">
                <h2>pos版本管理<small>列表</small></h2>
                <div class="clearfix"></div>
            </div>
            <form action="" method="get">
            <div class="row-fluid">
                 <a class="btn btn-success" href="{eval U(['system/posadd','menu_id'=>'system/index'])}"> 添加新版本</a>
             </div>
            <div class="x_content" style="display: block;">
                <table class="table">
                    <thead>
                    <tr>
                        <th width="5%">#</th>
                        <th width="10%">
                            <select id="pos_type" name="pos_type">
                                <option value="0" >全部</option>
                                <option value="1" {if isset($smarty.get.pos_type) && $smarty.get.pos_type == 1 }selected{/if}>台式POS</option>
                                <option value="2" {if isset($smarty.get.pos_type) && $smarty.get.pos_type == 2 }selected{/if}>手持POS</option>
                            </select>
                        </th>
                        <th width="10%">版本id</th>
                        <th width="10%">版本提示</th>
                        <th width="10%">状态</th>
                        <th width="10%">接口版本号</th>
                        <th width="10%">产品版本号</th>
                        <th width="10%">版本文件</th>
                        <th width="">创建日期</th>
                        <th width="">修改日期</th>
                        <th width="30%">操作</th>
                    </tr>
                    </thead>
                    <tbody>
                   {foreach $data.version.list $val $key}
                    <tr>
                        <td scope="row">{$val.id}</td>
                        <td>{if $val.type==1}台式{else}手持{/if}</td>
                        <td>{$val.bid}</td>
                        <td><textarea  disabled="disabled" style="border:0;overflow-x:hidden;overflow-y:scroll;">{$val.notice}</textarea></td>
                        <td>{if $val.status==1}<span class="text-success">可不更新</span>{else}<span class="text-danger">必需更新</span>{/if}</td>
                        <td>{$val.version}</td>
                        <td>{$val.app_ver}</td>
                        <td>{$val.filename}</td>
                        <td>{$val.create_date}</td>
                        <td>{$val.update_date}</td>
                        <td>
                           <div class="x_content">
                              <a class="btn btn-primary btn-xs" href="{eval U(['system/posedit','menu_id'=>'system/index','id'=>$val.id, 'pos_type'=>$val.type])}"> 编辑</a>
                              <button class="btn btn-danger btn-xs" data-toggle="dropdown">删除
                                <i class="icon-angle-down"></i></button>
                                <ul class="dropdown-menu">
                                    <li><a href="{eval U(['system/posdelete','menu_id'=>'system/index','id'=>$val.id])}">确定</a></li>
                                    <li><a href="javascript:;">取消</a></li>
                                </ul>
                           </div>
                        </td>
                    </tr>
                    {/foreach}
                    </tbody>
                </table>
            </div>
            {Yii::$app->view->render('/com/pager.php',['pager'=>$data['version']['pager']])}
            </form>
        </div>
    </div>

</div>

<script type="text/javascript">
    $('#pos_type').change(function() {
        $('form').submit();
    });
</script>